<<<<<<< HEAD
<!--  -->
<template>
  <div>
    <el-table
      @selection-change="selectionChange"
      class="el-tables"
      :data="tableData"
      stripe
      :header-cell-style="{ 'text-align': 'center' }"
      :cell-style="{ 'text-align': 'center' }"
    >
      <el-table-column type="selection"> </el-table-column>
      <el-table-column type="index" label="序号"></el-table-column>
      <slot name="tableline">
        <el-table-column prop="date" label="日期" width="180"> </el-table-column>
        <el-table-column prop="name" label="姓名" width="180"> </el-table-column>
        <el-table-column prop="address" label="地址"> </el-table-column>
      </slot>
      <slot name="chaozuo">
        <el-button type="primary" icon="el-icon-edit" plain></el-button>
        <el-button type="danger" icon="el-icon-delete" plain></el-button>
      </slot>
    </el-table>
  </div>
</template>

<script>
export default {
  name: "Maintable",
  components: {},
  computed: {},
  props: ["tableData"],
  data() {
    return {
      checked: true,
      multipleSelection: [],
      Selection: [],
    };
  },
  methods: {
    selectionChange(val) {
      // console.log(val);
      val = JSON.stringify(val);
      window.localStorage.setItem("val", val);
      // this.multipleSelection = [];
      // val.forEach((element) => {
      //   // console.log(element.id);
      //   if (this.multipleSelection.indexOf(element.id) === -1) {
      //     this.multipleSelection.push(element.id);
      //   }
      // });
      // console.log(this.multipleSelection);
    },
    DateHandler: function (row, column) {
      return new Date(row.CreateDate).toLocaleDateString();
    },
  },
};
</script>

<style lang="less" scoped>
.el-tables {
  width: 100%;
  text-align: center;
}
</style>
=======
<!--  -->
<template>
  <div>
    <el-table
      @selection-change="selectionChange"
      class="el-tables"
      :data="tableData"
      stripe
      :header-cell-style="{ 'text-align': 'center' }"
      :cell-style="{ 'text-align': 'center' }"
    >
      <el-table-column type="selection"> </el-table-column>
      <el-table-column type="index" label="序号"></el-table-column>
      <slot name="tableline">
        <el-table-column prop="date" label="日期" width="180"> </el-table-column>
        <el-table-column prop="name" label="姓名" width="180"> </el-table-column>
        <el-table-column prop="address" label="地址"> </el-table-column>
      </slot>
      <slot name="chaozuo">
        <el-button type="primary" icon="el-icon-edit" plain></el-button>
        <el-button type="danger" icon="el-icon-delete" plain></el-button>
      </slot>
    </el-table>
  </div>
</template>

<script>
export default {
  name: "Maintable",
  components: {},
  computed: {},
  props: ["tableData"],
  data() {
    return {
      checked: true,
      multipleSelection: [],
      Selection: [],
    };
  },
  methods: {
    selectionChange(val) {
      // console.log(val);
      val = JSON.stringify(val);
      window.localStorage.setItem("val", val);
      // this.multipleSelection = [];
      // val.forEach((element) => {
      //   // console.log(element.id);
      //   if (this.multipleSelection.indexOf(element.id) === -1) {
      //     this.multipleSelection.push(element.id);
      //   }
      // });
      // console.log(this.multipleSelection);
    },
    DateHandler: function (row, column) {
      return new Date(row.CreateDate).toLocaleDateString();
    },
  },
};
</script>

<style lang="less" scoped>
.el-tables {
  width: 100%;
  text-align: center;
}
</style>
>>>>>>> ae27e4fe2d4f939d0b0ee2bfa506b9e3269c53cb
